home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / QuickTimeMusic.p < prev    next >
Encoding:
Text File  |  1997-08-12  |  62.9 KB  |  1,448 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        QuickTimeMusic.p
  3.  
  4.      Contains:    QuickTime Interfaces.
  5.  
  6.      Version:    Technology:    QuickTime 2.5
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1990-1997 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT QuickTimeMusic;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __QUICKTIMEMUSIC__}
  28. {$SETC __QUICKTIMEMUSIC__ := 1}
  29.  
  30. {$I+}
  31. {$SETC QuickTimeMusicIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __COMPONENTS__}
  35. {$I Components.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __IMAGECOMPRESSION__}
  38. {$I ImageCompression.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __MOVIES__}
  41. {$I Movies.p}
  42. {$ENDC}
  43. {$IFC UNDEFINED __QUICKDRAW__}
  44. {$I Quickdraw.p}
  45. {$ENDC}
  46. {$IFC UNDEFINED __VIDEO__}
  47. {$I Video.p}
  48. {$ENDC}
  49. {$IFC UNDEFINED __SOUND__}
  50. {$I Sound.p}
  51. {$ENDC}
  52.  
  53.  
  54. {$PUSH}
  55. {$ALIGN MAC68K}
  56. {$LibExport+}
  57.  
  58.  
  59. CONST
  60.     kaiToneDescType                = 'tone';
  61.     kaiNoteRequestInfoType        = 'ntrq';
  62.     kaiKnobListType                = 'knbl';
  63.     kaiKeyRangeInfoType            = 'sinf';
  64.     kaiSampleDescType            = 'sdsc';
  65.     kaiSampleInfoType            = 'smin';
  66.     kaiSampleDataType            = 'sdat';
  67.     kaiInstInfoType                = 'iinf';
  68.     kaiPictType                    = 'pict';
  69.     kaiWriterType                = '©wrt';
  70.     kaiCopyrightType            = '©cpy';
  71.     kaiOtherStrType                = 'str ';
  72.     kaiInstrumentRefType        = 'iref';
  73.     kaiLibraryInfoType            = 'linf';
  74.     kaiLibraryDescType            = 'ldsc';
  75.  
  76.  
  77. TYPE
  78.     InstLibDescRecPtr = ^InstLibDescRec;
  79.     InstLibDescRec = RECORD
  80.         libIDName:                Str31;
  81.     END;
  82.  
  83.     InstKnobRecPtr = ^InstKnobRec;
  84.     InstKnobRec = RECORD
  85.         number:                    LONGINT;
  86.         value:                    LONGINT;
  87.     END;
  88.  
  89.  
  90. CONST
  91.     kInstKnobMissingUnknown        = 0;
  92.     kInstKnobMissingDefault        = $01;
  93.  
  94.  
  95. TYPE
  96.     InstKnobListPtr = ^InstKnobList;
  97.     InstKnobList = RECORD
  98.         knobCount:                LONGINT;
  99.         knobFlags:                LONGINT;
  100.         knob:                    ARRAY [0..0] OF InstKnobRec;
  101.     END;
  102.  
  103.  
  104. CONST
  105.     kMusicLoopTypeNormal        = 0;
  106.     kMusicLoopTypePalindrome    = 1;                            {  back & forth }
  107.  
  108.     instSamplePreProcessFlag    = $01;
  109.  
  110.  
  111.  
  112. TYPE
  113.     InstSampleDescRecPtr = ^InstSampleDescRec;
  114.     InstSampleDescRec = RECORD
  115.         dataFormat:                OSType;
  116.         numChannels:            INTEGER;
  117.         sampleSize:                INTEGER;
  118.         sampleRate:                UnsignedFixed;
  119.         sampleDataID:            INTEGER;
  120.         offset:                    LONGINT;                                {  offset within SampleData - this could be just for internal use }
  121.         numSamples:                LONGINT;                                {  this could also just be for internal use, we'll see }
  122.         loopType:                LONGINT;
  123.         loopStart:                LONGINT;
  124.         loopEnd:                LONGINT;
  125.         pitchNormal:            LONGINT;
  126.         pitchLow:                LONGINT;
  127.         pitchHigh:                LONGINT;
  128.     END;
  129.  
  130.     AtomicInstrument                    = Handle;
  131.     AtomicInstrumentPtr                    = Ptr;
  132.  
  133.  
  134. CONST
  135.     kMusicComponentType            = 'musi';
  136.  
  137.     kSoftSynthComponentSubType    = 'ss  ';
  138.     kGMSynthComponentSubType    = 'gm  ';
  139.  
  140.  
  141.  
  142. TYPE
  143.     MusicComponent                        = ComponentInstance;
  144. {  MusicSynthesizerFlags }
  145.  
  146. CONST
  147.     kSynthesizerDynamicVoice    = $01;                            {  can assign voices on the fly (else, polyphony is very important  }
  148.     kSynthesizerUsesMIDIPort    = $02;                            {  must be patched through MIDI Manager  }
  149.     kSynthesizerMicrotone        = $04;                            {  can play microtonal scales  }
  150.     kSynthesizerHasSamples        = $08;                            {  synthesizer has some use for sampled data  }
  151.     kSynthesizerMixedDrums        = $10;                            {  any part can play drum parts, total = instrument parts  }
  152.     kSynthesizerSoftware        = $20;                            {  implemented in main CPU software == uses cpu cycles  }
  153.     kSynthesizerHardware        = $40;                            {  is a hardware device (such as nubus, or maybe DSP?)  }
  154.     kSynthesizerDynamicChannel    = $80;                            {  can move any part to any channel or disable each part. (else we assume it lives on all channels in masks)  }
  155.     kSynthesizerHogsSystemChannel = $0100;                        {  can be channelwise dynamic, but always responds on its system channel  }
  156.     kSynthesizerSlowSetPart        = $0400;                        {  SetPart() and SetPartInstrumentNumber() calls do not have rapid response, may glitch notes  }
  157.     kSynthesizerOffline            = $1000;                        {  can enter an offline synthesis mode  }
  158.     kSynthesizerGM                = $4000;                        {  synth is a GM device  }
  159.     kSynthesizerSoundLocalization = $00010000;                    {  synth is a GM device  }
  160.  
  161. {
  162.  * Note that these controller numbers
  163.  * are _not_ identical to the MIDI controller numbers.
  164.  * These are _signed_ 8.8 values, and the LSB's are
  165.  * always sent to a MIDI device. Controllers 32-63 are
  166.  * reserved (for MIDI, they are LSB's for 0-31, but we
  167.  * always send both).
  168.  *
  169.  * The full range, therefore, is -128.00 to 127.7f.
  170.  *
  171.  * _Excepting_ _volume_, all controls default to zero.
  172.  *
  173.  * Pitch bend is specified in fractional semitones! No
  174.  * more "pitch bend range" nonsense. You can bend as far
  175.  * as you want, any time you want.
  176.  }
  177.  
  178. TYPE
  179.     MusicController                        = SInt32;
  180.  
  181. CONST
  182.     kControllerModulationWheel    = 1;
  183.     kControllerBreath            = 2;
  184.     kControllerFoot                = 4;
  185.     kControllerPortamentoTime    = 5;                            {  portamento on/off is omitted, 0 time = 'off'  }
  186.     kControllerVolume            = 7;
  187.     kControllerBalance            = 8;
  188.     kControllerPan                = 10;                            {  0 - "default", 1 - n: positioned in output 1-n (incl fractions)  }
  189.     kControllerExpression        = 11;
  190.     kControllerLever1            = 16;                            {  general purpose controllers  }
  191.     kControllerLever2            = 17;                            {  general purpose controllers  }
  192.     kControllerLever3            = 18;                            {  general purpose controllers  }
  193.     kControllerLever4            = 19;                            {  general purpose controllers  }
  194.     kControllerLever5            = 80;                            {  general purpose controllers  }
  195.     kControllerLever6            = 81;                            {  general purpose controllers  }
  196.     kControllerLever7            = 82;                            {  general purpose controllers  }
  197.     kControllerLever8            = 83;                            {  general purpose controllers  }
  198.     kControllerPitchBend        = 32;                            {  positive & negative semitones, with 7 bits fraction  }
  199.     kControllerAfterTouch        = 33;                            {  aka channel pressure  }
  200.     kControllerSustain            = 64;                            {  boolean - positive for on, 0 or negative off  }
  201.     kControllerSostenuto        = 66;                            {  boolean  }
  202.     kControllerSoftPedal        = 67;                            {  boolean  }
  203.     kControllerReverb            = 91;
  204.     kControllerTremolo            = 92;
  205.     kControllerChorus            = 93;
  206.     kControllerCeleste            = 94;
  207.     kControllerPhaser            = 95;
  208.     kControllerEditPart            = 113;                            {  last 16 controllers 113-128 and above are global controllers which respond on part zero  }
  209.     kControllerMasterTune        = 114;
  210.  
  211.     kControllerMaximum            = $7FFF;                        {  +01111111.11111111  }
  212.     kControllerMinimum            = $8000;                        {  -10000000.00000000  }
  213.  
  214.  
  215. TYPE
  216.     SynthesizerDescriptionPtr = ^SynthesizerDescription;
  217.     SynthesizerDescription = RECORD
  218.         synthesizerType:        OSType;                                    {  synthesizer type (must be same as component subtype)  }
  219.         name:                    Str31;                                    {  text name of synthesizer type  }
  220.         flags:                    LONGINT;                                {  from the above enum  }
  221.         voiceCount:                LONGINT;                                {  maximum polyphony  }
  222.         partCount:                LONGINT;                                {  maximum multi-timbrality (and midi channels)  }
  223.         instrumentCount:        LONGINT;                                {  non gm, built in (rom) instruments only  }
  224.         modifiableInstrumentCount: LONGINT;                                {  plus n-more are user modifiable  }
  225.         channelMask:            LONGINT;                                {  (midi device only) which channels device always uses  }
  226.         drumPartCount:            LONGINT;                                {  maximum multi-timbrality of drum parts  }
  227.         drumCount:                LONGINT;                                {  non gm, built in (rom) drumkits only  }
  228.         modifiableDrumCount:    LONGINT;                                {  plus n-more are user modifiable  }
  229.         drumChannelMask:        LONGINT;                                {  (midi device only) which channels device always uses  }
  230.         outputCount:            LONGINT;                                {  number of audio outputs (usually two)  }
  231.         latency:                LONGINT;                                {  response time in µSec  }
  232.         controllers:            ARRAY [0..3] OF LONGINT;                {  array of 128 bits  }
  233.         gmInstruments:            ARRAY [0..3] OF LONGINT;                {  array of 128 bits  }
  234.         gmDrums:                ARRAY [0..3] OF LONGINT;                {  array of 128 bits  }
  235.     END;
  236.  
  237.  
  238. CONST
  239.     kVoiceCountDynamic            = -1;                            {  constant to use to specify dynamic voicing  }
  240.  
  241.  
  242.  
  243. TYPE
  244.     ToneDescriptionPtr = ^ToneDescription;
  245.     ToneDescription = RECORD
  246.         synthesizerType:        OSType;                                    {  synthesizer type  }
  247.         synthesizerName:        Str31;                                    {  name of instantiation of synth  }
  248.         instrumentName:            Str31;                                    {  preferred name for human use  }
  249.         instrumentNumber:        LONGINT;                                {  inst-number used if synth-name matches  }
  250.         gmNumber:                LONGINT;                                {  Best matching general MIDI number  }
  251.     END;
  252.  
  253.  
  254. CONST
  255.     kFirstDrumkit                = 16384;                        {  (first value is "no drum". instrument numbers from 16384->16384+128 are drumkits, and for GM they are _defined_ drumkits!  }
  256.     kLastDrumkit                = 16512;
  257.  
  258. {  InstrumentMatch }
  259.     kInstrumentMatchSynthesizerType = 1;
  260.     kInstrumentMatchSynthesizerName = 2;
  261.     kInstrumentMatchName        = 4;
  262.     kInstrumentMatchNumber        = 8;
  263.     kInstrumentMatchGMNumber    = 16;
  264.  
  265. {  KnobFlags }
  266.     kKnobReadOnly                = 16;                            {  knob value cannot be changed by user or with a SetKnob call  }
  267.     kKnobInterruptUnsafe        = 32;                            {  only alter this knob from foreground task time (may access toolbox)  }
  268.     kKnobKeyrangeOverride        = 64;                            {  knob can be overridden within a single keyrange (software synth only)  }
  269.     kKnobGroupStart                = 128;                            {  knob is first in some logical group of knobs  }
  270.     kKnobFixedPoint8            = 1024;
  271.     kKnobFixedPoint16            = 2048;                            {  One of these may be used at a time.  }
  272.     kKnobTypeNumber                = $00;
  273.     kKnobTypeGroupName            = $1000;                        {  "knob" is really a group name for display purposes  }
  274.     kKnobTypeBoolean            = $2000;                        {  if range is greater than 1, its a multi-checkbox field  }
  275.     kKnobTypeNote                = $3000;                        {  knob range is equivalent to MIDI keys  }
  276.     kKnobTypePan                = $4000;                        {  range goes left/right (lose this? )  }
  277.     kKnobTypeInstrument            = $5000;                        {  knob value = reference to another instrument number  }
  278.     kKnobTypeSetting            = $6000;                        {  knob value is 1 of n different things (eg, fm algorithms) popup menu  }
  279.     kKnobTypeMilliseconds        = $7000;                        {  knob is a millisecond time range  }
  280.     kKnobTypePercentage            = $8000;                        {  knob range is displayed as a Percentage  }
  281.     kKnobTypeHertz                = $9000;                        {  knob represents frequency  }
  282.     kKnobTypeButton                = $A000;                        {  momentary trigger push button  }
  283.  
  284.  
  285.     kUnknownKnobValue            = $7FFFFFFF;                    {  a knob with this value means, we don't know it.  }
  286.     kDefaultKnobValue            = $7FFFFFFE;                    {  used to SET a knob to its default value.  }
  287.  
  288.  
  289. TYPE
  290.     KnobDescriptionPtr = ^KnobDescription;
  291.     KnobDescription = RECORD
  292.         name:                    Str63;
  293.         lowValue:                LONGINT;
  294.         highValue:                LONGINT;
  295.         defaultValue:            LONGINT;                                {  a default instrument is made of all default values  }
  296.         flags:                    LONGINT;
  297.         knobID:                    LONGINT;
  298.     END;
  299.  
  300.     GCInstrumentDataPtr = ^GCInstrumentData;
  301.     GCInstrumentData = RECORD
  302.         tone:                    ToneDescription;
  303.         knobCount:                LONGINT;
  304.         knob:                    ARRAY [0..0] OF LONGINT;
  305.     END;
  306.  
  307.     GCInstrumentDataHandle                = ^GCInstrumentDataPtr;
  308.     InstrumentAboutInfoPtr = ^InstrumentAboutInfo;
  309.     InstrumentAboutInfo = RECORD
  310.         p:                        PicHandle;
  311.         author:                    Str255;
  312.         copyright:                Str255;
  313.         other:                    Str255;
  314.     END;
  315.  
  316.  
  317. CONST
  318.     kMusicPacketPortLost        = 1;                            {  received when application loses the default input port  }
  319.     kMusicPacketPortFound        = 2;                            {  received when application gets it back out from under someone else's claim  }
  320.     kMusicPacketTimeGap            = 3;                            {  data[0] = number of milliseconds to keep the MIDI line silent  }
  321.  
  322.  
  323. TYPE
  324.     MusicMIDIPacketPtr = ^MusicMIDIPacket;
  325.     MusicMIDIPacket = RECORD
  326.         length:                    INTEGER;
  327.         reserved:                LONGINT;                                {  if length zero, then reserved = above enum  }
  328.         data:                    PACKED ARRAY [0..248] OF UInt8;
  329.     END;
  330.  
  331.     MusicMIDISendProcPtr = ProcPtr;  { FUNCTION MusicMIDISend(self: MusicComponent; refCon: LONGINT; VAR mmp: MusicMIDIPacket): ComponentResult; }
  332.  
  333.     MusicMIDISendUPP = UniversalProcPtr;
  334.     MusicMIDIReadHookProcPtr = ProcPtr;  { FUNCTION MusicMIDIReadHook(VAR mp: MusicMIDIPacket; myRefCon: LONGINT): ComponentResult; }
  335.  
  336.     MusicMIDIReadHookUPP = UniversalProcPtr;
  337.  
  338.  
  339.  
  340. CONST
  341.     notImplementedMusicErr        = $8000F7E9;
  342.     cantSendToSynthesizerErr    = $8000F7E8;
  343.     cantReceiveFromSynthesizerErr = $8000F7E7;
  344.     illegalVoiceAllocationErr    = $8000F7E6;
  345.     illegalPartErr                = $8000F7E5;
  346.     illegalChannelErr            = $8000F7E4;
  347.     illegalKnobErr                = $8000F7E3;
  348.     illegalKnobValueErr            = $8000F7E2;
  349.     illegalInstrumentErr        = $8000F7E1;
  350.     illegalControllerErr        = $8000F7E0;
  351.     midiManagerAbsentErr        = $8000F7DF;
  352.     synthesizerNotRespondingErr    = $8000F7DE;
  353.     synthesizerErr                = $8000F7DD;
  354.     illegalNoteChannelErr        = $8000F7DC;
  355.     noteChannelNotAllocatedErr    = $8000F7DB;
  356.     tunePlayerFullErr            = $8000F7DA;
  357.     tuneParseErr                = $8000F7D9;
  358.  
  359.     kGetAtomicInstNoExpandedSamples = $01;
  360.     kGetAtomicInstNoOriginalSamples = $02;
  361.     kGetAtomicInstNoSamples        = $03;
  362.     kGetAtomicInstNoKnobList    = $04;
  363.     kGetAtomicInstNoInstrumentInfo = $08;
  364.     kGetAtomicInstOriginalKnobList = $10;
  365.     kGetAtomicInstAllKnobs        = $20;                            {  return even those that are set to default }
  366.  
  367. {
  368.    For non-gm instruments, instrument number of tone description == 0
  369.    If you want to speed up while running, slam the inst num with what Get instrument number returns
  370.    All missing knobs are slammed to the default value
  371. }
  372.     kSetAtomicInstKeepOriginalInstrument = $01;
  373.     kSetAtomicInstShareAcrossParts = $02;                        {  inst disappears when app goes away }
  374.     kSetAtomicInstCallerTosses    = $04;                            {  the caller isn't keeping a copy around (for NASetAtomicInstrument) }
  375.     kSetAtomicInstCallerGuarantees = $08;                        {  the caller guarantees a copy is around }
  376.     kSetAtomicInstInterruptSafe    = $10;                            {  dont move memory at this time (but process at next task time) }
  377.     kSetAtomicInstDontPreprocess = $80;                            {  perform no further preprocessing because either 1)you know the instrument is digitally clean, or 2) you got it from a GetPartAtomic }
  378.  
  379.     kInstrumentNamesModifiable    = 1;
  380.     kInstrumentNamesBoth        = 2;
  381.  
  382. {
  383.  * Structures specific to the GenericMusicComponent
  384.  }
  385.  
  386.     kGenericMusicComponentSubtype = 'gene';
  387.  
  388.  
  389. TYPE
  390.     GenericKnobDescriptionPtr = ^GenericKnobDescription;
  391.     GenericKnobDescription = RECORD
  392.         kd:                        KnobDescription;
  393.         hw1:                    LONGINT;                                {  driver defined  }
  394.         hw2:                    LONGINT;                                {  driver defined  }
  395.         hw3:                    LONGINT;                                {  driver defined  }
  396.         settingsID:                LONGINT;                                {  resource ID list for boolean and popup names  }
  397.     END;
  398.  
  399.     GenericKnobDescriptionListPtr = ^GenericKnobDescriptionList;
  400.     GenericKnobDescriptionList = RECORD
  401.         knobCount:                LONGINT;
  402.         knob:                    ARRAY [0..0] OF GenericKnobDescription;
  403.     END;
  404.  
  405.     GenericKnobDescriptionListHandle    = ^GenericKnobDescriptionListPtr;
  406. { knobTypes for MusicDerivedSetKnob }
  407.  
  408. CONST
  409.     kGenericMusicKnob            = 1;
  410.     kGenericMusicInstrumentKnob    = 2;
  411.     kGenericMusicDrumKnob        = 3;
  412.     kGenericMusicGlobalController = 4;
  413.  
  414.  
  415.  
  416.     kGenericMusicResFirst        = 0;
  417.     kGenericMusicResMiscStringList = 1;                            {  STR# 1: synth name, 2:about author,3:aboutcopyright,4:aboutother  }
  418.     kGenericMusicResMiscLongList = 2;                            {  Long various params, see list below  }
  419.     kGenericMusicResInstrumentList = 3;                            {  NmLs of names and shorts, categories prefixed by '••'  }
  420.     kGenericMusicResDrumList    = 4;                            {  NmLs of names and shorts  }
  421.     kGenericMusicResInstrumentKnobDescriptionList = 5;            {  Knob  }
  422.     kGenericMusicResDrumKnobDescriptionList = 6;                {  Knob  }
  423.     kGenericMusicResKnobDescriptionList = 7;                    {  Knob  }
  424.     kGenericMusicResBitsLongList = 8;                            {  Long back to back bitmaps of controllers, gminstruments, and drums  }
  425.     kGenericMusicResModifiableInstrumentHW = 9;                    {  Shrt same as the hw shorts trailing the instrument names, a shortlist  }
  426.     kGenericMusicResGMTranslation = 10;                            {  Long 128 long entries, 1 for each gm inst, of local instrument numbers 1-n (not hw numbers)  }
  427.     kGenericMusicResROMInstrumentData = 11;                        {  knob lists for ROM instruments, so the knob values may be known  }
  428.     kGenericMusicResAboutPICT    = 12;                            {  picture for aboutlist. must be present for GetAbout call to work  }
  429.     kGenericMusicResLast        = 13;
  430.  
  431. { elements of the misc long list }
  432.     kGenericMusicMiscLongFirst    = 0;
  433.     kGenericMusicMiscLongVoiceCount = 1;
  434.     kGenericMusicMiscLongPartCount = 2;
  435.     kGenericMusicMiscLongModifiableInstrumentCount = 3;
  436.     kGenericMusicMiscLongChannelMask = 4;
  437.     kGenericMusicMiscLongDrumPartCount = 5;
  438.     kGenericMusicMiscLongModifiableDrumCount = 6;
  439.     kGenericMusicMiscLongDrumChannelMask = 7;
  440.     kGenericMusicMiscLongOutputCount = 8;
  441.     kGenericMusicMiscLongLatency = 9;
  442.     kGenericMusicMiscLongFlags    = 10;
  443.     kGenericMusicMiscLongFirstGMHW = 11;                        {  number to add to locate GM main instruments  }
  444.     kGenericMusicMiscLongFirstGMDrumHW = 12;                    {  number to add to locate GM drumkits  }
  445.     kGenericMusicMiscLongFirstUserHW = 13;                        {  First hw number of user instruments (presumed sequential)  }
  446.     kGenericMusicMiscLongLast    = 14;
  447.  
  448.  
  449. TYPE
  450.     GCPartPtr = ^GCPart;
  451.     GCPart = RECORD
  452.         hwInstrumentNumber:        LONGINT;                                {  internal number of recalled instrument  }
  453.         controller:                ARRAY [0..127] OF INTEGER;                {  current values for all controllers  }
  454.         volume:                    LONGINT;                                {  ctrl 7 is special case  }
  455.         polyphony:                LONGINT;
  456.         midiChannel:            LONGINT;                                {  1-16 if in use  }
  457.         id:                        GCInstrumentData;                        {  ToneDescription & knoblist, uncertain length  }
  458.     END;
  459.  
  460. {
  461.  * Calls specific to the GenericMusicComponent
  462.  }
  463.  
  464. CONST
  465.     kMusicGenericRange            = $0100;
  466.     kMusicDerivedRange            = $0200;
  467.  
  468. {
  469.  * Flags in GenericMusicConfigure call
  470.  }
  471.     kGenericMusicDoMIDI            = $01;                            {  implement normal MIDI messages for note, controllers, and program changes 0-127  }
  472.     kGenericMusicBank0            = $02;                            {  implement instrument bank changes on controller 0  }
  473.     kGenericMusicBank32            = $04;                            {  implement instrument bank changes on controller 32  }
  474.     kGenericMusicErsatzMIDI        = $08;                            {  construct MIDI packets, but send them to the derived component  }
  475.     kGenericMusicCallKnobs        = $10;                            {  call the derived component with special knob format call  }
  476.     kGenericMusicCallParts        = $20;                            {  call the derived component with special part format call  }
  477.     kGenericMusicCallInstrument    = $40;                            {  call MusicDerivedSetInstrument for MusicSetInstrument calls  }
  478.     kGenericMusicCallNumber        = $80;                            {  call MusicDerivedSetPartInstrumentNumber for MusicSetPartInstrumentNumber calls, & don't send any C0 or bank stuff  }
  479.     kGenericMusicCallROMInstrument = $0100;                        {  call MusicSetInstrument for MusicSetPartInstrumentNumber for "ROM" instruments, passing params from the ROMi resource  }
  480.     kGenericMusicAllDefaults    = $0200;                        {  indicates that when a new instrument is recalled, all knobs are reset to DEFAULT settings. True for GS modules  }
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487. TYPE
  488.     MusicOfflineDataProcPtr = ProcPtr;  { FUNCTION MusicOfflineData(SoundData: Ptr; numBytes: LONGINT; myRefCon: LONGINT): ComponentResult; }
  489.  
  490.     MusicOfflineDataUPP = UniversalProcPtr;
  491.     OfflineSampleTypePtr = ^OfflineSampleType;
  492.     OfflineSampleType = RECORD
  493.         numChannels:            LONGINT;                                { number of channels,  ie mono = 1 }
  494.         sampleRate:                UnsignedFixed;                            { sample rate in Apples Fixed point representation }
  495.         sampleSize:                INTEGER;                                { number of bits in sample }
  496.     END;
  497.  
  498.     InstrumentInfoRecordPtr = ^InstrumentInfoRecord;
  499.     InstrumentInfoRecord = RECORD
  500.         instrumentNumber:        LONGINT;                                {  instrument number (if 0, name is a catagory) }
  501.         flags:                    LONGINT;                                {  show in picker, etc. }
  502.         toneNameIndex:            LONGINT;                                {  index in toneNames (1 based) }
  503.         itxtNameAtomID:            LONGINT;                                {  index in itxtNames (itxt/name by index) }
  504.     END;
  505.  
  506.     InstrumentInfoListPtr = ^InstrumentInfoList;
  507.     InstrumentInfoList = RECORD
  508.         recordCount:            LONGINT;
  509.         toneNames:                Handle;                                    {  name from tone description }
  510.         itxtNames:                QTAtomContainer;                        {  itxt/name atoms for instruments }
  511.         info:                    ARRAY [0..0] OF InstrumentInfoRecord;
  512.     END;
  513.  
  514.     InstrumentInfoListHandle            = ^InstrumentInfoListPtr;
  515. FUNCTION MusicGetDescription(mc: MusicComponent; VAR sd: SynthesizerDescription): ComponentResult;
  516.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  517.     INLINE $2F3C, $0004, $0001, $7000, $A82A;
  518.     {$ENDC}
  519. FUNCTION MusicGetPart(mc: MusicComponent; part: LONGINT; VAR midiChannel: LONGINT; VAR polyphony: LONGINT): ComponentResult;
  520.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  521.     INLINE $2F3C, $000C, $0002, $7000, $A82A;
  522.     {$ENDC}
  523. FUNCTION MusicSetPart(mc: MusicComponent; part: LONGINT; midiChannel: LONGINT; polyphony: LONGINT): ComponentResult;
  524.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  525.     INLINE $2F3C, $000C, $0003, $7000, $A82A;
  526.     {$ENDC}
  527. FUNCTION MusicSetPartInstrumentNumber(mc: MusicComponent; part: LONGINT; instrumentNumber: LONGINT): ComponentResult;
  528.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  529.     INLINE $2F3C, $0008, $0004, $7000, $A82A;
  530.     {$ENDC}
  531.  
  532. FUNCTION MusicGetPartInstrumentNumber(mc: MusicComponent; part: LONGINT): ComponentResult;
  533.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  534.     INLINE $2F3C, $0004, $0005, $7000, $A82A;
  535.     {$ENDC}
  536. FUNCTION MusicStorePartInstrument(mc: MusicComponent; part: LONGINT; instrumentNumber: LONGINT): ComponentResult;
  537.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  538.     INLINE $2F3C, $0008, $0006, $7000, $A82A;
  539.     {$ENDC}
  540.  
  541. FUNCTION MusicGetPartAtomicInstrument(mc: MusicComponent; part: LONGINT; VAR ai: AtomicInstrument; flags: LONGINT): ComponentResult;
  542.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  543.     INLINE $2F3C, $000C, $0009, $7000, $A82A;
  544.     {$ENDC}
  545. FUNCTION MusicSetPartAtomicInstrument(mc: MusicComponent; part: LONGINT; aiP: AtomicInstrumentPtr; flags: LONGINT): ComponentResult;
  546.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  547.     INLINE $2F3C, $000C, $000A, $7000, $A82A;
  548.     {$ENDC}
  549.  
  550. {  Obsolete calls }
  551. FUNCTION MusicGetInstrumentKnobDescriptionObsolete(mc: MusicComponent; knobIndex: LONGINT; mkd: UNIV Ptr): ComponentResult;
  552.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  553.     INLINE $2F3C, $0008, $000D, $7000, $A82A;
  554.     {$ENDC}
  555. FUNCTION MusicGetDrumKnobDescriptionObsolete(mc: MusicComponent; knobIndex: LONGINT; mkd: UNIV Ptr): ComponentResult;
  556.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  557.     INLINE $2F3C, $0008, $000E, $7000, $A82A;
  558.     {$ENDC}
  559. FUNCTION MusicGetKnobDescriptionObsolete(mc: MusicComponent; knobIndex: LONGINT; mkd: UNIV Ptr): ComponentResult;
  560.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  561.     INLINE $2F3C, $0008, $000F, $7000, $A82A;
  562.     {$ENDC}
  563. FUNCTION MusicGetPartKnob(mc: MusicComponent; part: LONGINT; knobID: LONGINT): ComponentResult;
  564.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  565.     INLINE $2F3C, $0008, $0010, $7000, $A82A;
  566.     {$ENDC}
  567. FUNCTION MusicSetPartKnob(mc: MusicComponent; part: LONGINT; knobID: LONGINT; knobValue: LONGINT): ComponentResult;
  568.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  569.     INLINE $2F3C, $000C, $0011, $7000, $A82A;
  570.     {$ENDC}
  571. FUNCTION MusicGetKnob(mc: MusicComponent; knobID: LONGINT): ComponentResult;
  572.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  573.     INLINE $2F3C, $0004, $0012, $7000, $A82A;
  574.     {$ENDC}
  575. FUNCTION MusicSetKnob(mc: MusicComponent; knobID: LONGINT; knobValue: LONGINT): ComponentResult;
  576.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  577.     INLINE $2F3C, $0008, $0013, $7000, $A82A;
  578.     {$ENDC}
  579. FUNCTION MusicGetPartName(mc: MusicComponent; part: LONGINT; name: StringPtr): ComponentResult;
  580.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  581.     INLINE $2F3C, $0008, $0014, $7000, $A82A;
  582.     {$ENDC}
  583. FUNCTION MusicSetPartName(mc: MusicComponent; part: LONGINT; name: StringPtr): ComponentResult;
  584.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  585.     INLINE $2F3C, $0008, $0015, $7000, $A82A;
  586.     {$ENDC}
  587. FUNCTION MusicFindTone(mc: MusicComponent; VAR td: ToneDescription; VAR instrumentNumber: LONGINT; VAR fit: LONGINT): ComponentResult;
  588.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  589.     INLINE $2F3C, $000C, $0016, $7000, $A82A;
  590.     {$ENDC}
  591. FUNCTION MusicPlayNote(mc: MusicComponent; part: LONGINT; pitch: LONGINT; velocity: LONGINT): ComponentResult;
  592.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  593.     INLINE $2F3C, $000C, $0017, $7000, $A82A;
  594.     {$ENDC}
  595. FUNCTION MusicResetPart(mc: MusicComponent; part: LONGINT): ComponentResult;
  596.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  597.     INLINE $2F3C, $0004, $0018, $7000, $A82A;
  598.     {$ENDC}
  599. FUNCTION MusicSetPartController(mc: MusicComponent; part: LONGINT; controllerNumber: MusicController; controllerValue: LONGINT): ComponentResult;
  600.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  601.     INLINE $2F3C, $000C, $0019, $7000, $A82A;
  602.     {$ENDC}
  603.  
  604. FUNCTION MusicGetPartController(mc: MusicComponent; part: LONGINT; controllerNumber: MusicController): ComponentResult;
  605.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  606.     INLINE $2F3C, $0008, $001A, $7000, $A82A;
  607.     {$ENDC}
  608. FUNCTION MusicGetMIDIProc(mc: MusicComponent; VAR midiSendProc: MusicMIDISendUPP; VAR refCon: LONGINT): ComponentResult;
  609.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  610.     INLINE $2F3C, $0008, $001B, $7000, $A82A;
  611.     {$ENDC}
  612. FUNCTION MusicSetMIDIProc(mc: MusicComponent; midiSendProc: MusicMIDISendUPP; refCon: LONGINT): ComponentResult;
  613.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  614.     INLINE $2F3C, $0008, $001C, $7000, $A82A;
  615.     {$ENDC}
  616. FUNCTION MusicGetInstrumentNames(mc: MusicComponent; modifiableInstruments: LONGINT; VAR instrumentNames: Handle; VAR instrumentCategoryLasts: Handle; VAR instrumentCategoryNames: Handle): ComponentResult;
  617.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  618.     INLINE $2F3C, $0010, $001D, $7000, $A82A;
  619.     {$ENDC}
  620. FUNCTION MusicGetDrumNames(mc: MusicComponent; modifiableInstruments: LONGINT; VAR instrumentNumbers: Handle; VAR instrumentNames: Handle): ComponentResult;
  621.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  622.     INLINE $2F3C, $000C, $001E, $7000, $A82A;
  623.     {$ENDC}
  624. FUNCTION MusicGetMasterTune(mc: MusicComponent): ComponentResult;
  625.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  626.     INLINE $2F3C, $0000, $001F, $7000, $A82A;
  627.     {$ENDC}
  628. FUNCTION MusicSetMasterTune(mc: MusicComponent; masterTune: LONGINT): ComponentResult;
  629.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  630.     INLINE $2F3C, $0004, $0020, $7000, $A82A;
  631.     {$ENDC}
  632.  
  633. FUNCTION MusicGetInstrumentAboutInfo(mc: MusicComponent; part: LONGINT; VAR iai: InstrumentAboutInfo): ComponentResult;
  634.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  635.     INLINE $2F3C, $0008, $0022, $7000, $A82A;
  636.     {$ENDC}
  637. FUNCTION MusicGetDeviceConnection(mc: MusicComponent; index: LONGINT; VAR id1: LONGINT; VAR id2: LONGINT): ComponentResult;
  638.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  639.     INLINE $2F3C, $000C, $0023, $7000, $A82A;
  640.     {$ENDC}
  641. FUNCTION MusicUseDeviceConnection(mc: MusicComponent; id1: LONGINT; id2: LONGINT): ComponentResult;
  642.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  643.     INLINE $2F3C, $0008, $0024, $7000, $A82A;
  644.     {$ENDC}
  645. FUNCTION MusicGetKnobSettingStrings(mc: MusicComponent; knobIndex: LONGINT; isGlobal: LONGINT; VAR settingsNames: Handle; VAR settingsCategoryLasts: Handle; VAR settingsCategoryNames: Handle): ComponentResult;
  646.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  647.     INLINE $2F3C, $0014, $0025, $7000, $A82A;
  648.     {$ENDC}
  649. FUNCTION MusicGetMIDIPorts(mc: MusicComponent; VAR inputPortCount: LONGINT; VAR outputPortCount: LONGINT): ComponentResult;
  650.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  651.     INLINE $2F3C, $0008, $0026, $7000, $A82A;
  652.     {$ENDC}
  653. FUNCTION MusicSendMIDI(mc: MusicComponent; portIndex: LONGINT; VAR mp: MusicMIDIPacket): ComponentResult;
  654.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  655.     INLINE $2F3C, $0008, $0027, $7000, $A82A;
  656.     {$ENDC}
  657. FUNCTION MusicReceiveMIDI(mc: MusicComponent; readHook: MusicMIDIReadHookUPP; refCon: LONGINT): ComponentResult;
  658.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  659.     INLINE $2F3C, $0008, $0028, $7000, $A82A;
  660.     {$ENDC}
  661. FUNCTION MusicStartOffline(mc: MusicComponent; VAR numChannels: LONGINT; VAR sampleRate: UnsignedFixed; VAR sampleSize: INTEGER; dataProc: MusicOfflineDataUPP; dataProcRefCon: LONGINT): ComponentResult;
  662.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  663.     INLINE $2F3C, $0014, $0029, $7000, $A82A;
  664.     {$ENDC}
  665. FUNCTION MusicSetOfflineTimeTo(mc: MusicComponent; newTimeStamp: LONGINT): ComponentResult;
  666.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  667.     INLINE $2F3C, $0004, $002A, $7000, $A82A;
  668.     {$ENDC}
  669. FUNCTION MusicGetInstrumentKnobDescription(mc: MusicComponent; knobIndex: LONGINT; VAR mkd: KnobDescription): ComponentResult;
  670.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  671.     INLINE $2F3C, $0008, $002B, $7000, $A82A;
  672.     {$ENDC}
  673. FUNCTION MusicGetDrumKnobDescription(mc: MusicComponent; knobIndex: LONGINT; VAR mkd: KnobDescription): ComponentResult;
  674.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  675.     INLINE $2F3C, $0008, $002C, $7000, $A82A;
  676.     {$ENDC}
  677. FUNCTION MusicGetKnobDescription(mc: MusicComponent; knobIndex: LONGINT; VAR mkd: KnobDescription): ComponentResult;
  678.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  679.     INLINE $2F3C, $0008, $002D, $7000, $A82A;
  680.     {$ENDC}
  681. FUNCTION MusicGetInfoText(mc: MusicComponent; selector: LONGINT; VAR textH: Handle; VAR styleH: Handle): ComponentResult;
  682.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  683.     INLINE $2F3C, $000C, $002E, $7000, $A82A;
  684.     {$ENDC}
  685.  
  686. CONST
  687.     kGetInstrumentInfoNoBuiltIn    = $01;
  688.     kGetInstrumentInfoMidiUserInst = $02;
  689.     kGetInstrumentInfoNoIText    = $04;
  690.  
  691. FUNCTION MusicGetInstrumentInfo(mc: MusicComponent; getInstrumentInfoFlags: LONGINT; VAR infoListH: InstrumentInfoListHandle): ComponentResult;
  692.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  693.     INLINE $2F3C, $0008, $002F, $7000, $A82A;
  694.     {$ENDC}
  695.  
  696.  
  697.  
  698. FUNCTION MusicTask(mc: MusicComponent): ComponentResult;
  699.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  700.     INLINE $2F3C, $0000, $0031, $7000, $A82A;
  701.     {$ENDC}
  702. FUNCTION MusicSetPartInstrumentNumberInterruptSafe(mc: MusicComponent; part: LONGINT; instrumentNumber: LONGINT): ComponentResult;
  703.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  704.     INLINE $2F3C, $0008, $0032, $7000, $A82A;
  705.     {$ENDC}
  706. FUNCTION MusicSetPartSoundLocalization(mc: MusicComponent; part: LONGINT; data: Handle): ComponentResult;
  707.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  708.     INLINE $2F3C, $0008, $0033, $7000, $A82A;
  709.     {$ENDC}
  710.  
  711.  
  712.  
  713. FUNCTION MusicGenericConfigure(mc: MusicComponent; mode: LONGINT; flags: LONGINT; baseResID: LONGINT): ComponentResult;
  714.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  715.     INLINE $2F3C, $000C, $0100, $7000, $A82A;
  716.     {$ENDC}
  717. FUNCTION MusicGenericGetPart(mc: MusicComponent; partNumber: LONGINT; VAR part: GCPartPtr): ComponentResult;
  718.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  719.     INLINE $2F3C, $0008, $0101, $7000, $A82A;
  720.     {$ENDC}
  721. FUNCTION MusicGenericGetKnobList(mc: MusicComponent; knobType: LONGINT; VAR gkdlH: GenericKnobDescriptionListHandle): ComponentResult;
  722.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  723.     INLINE $2F3C, $0008, $0102, $7000, $A82A;
  724.     {$ENDC}
  725. FUNCTION MusicDerivedMIDISend(mc: MusicComponent; VAR packet: MusicMIDIPacket): ComponentResult;
  726.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  727.     INLINE $2F3C, $0004, $0200, $7000, $A82A;
  728.     {$ENDC}
  729. FUNCTION MusicDerivedSetKnob(mc: MusicComponent; knobType: LONGINT; knobNumber: LONGINT; knobValue: LONGINT; partNumber: LONGINT; VAR p: GCPart; VAR gkd: GenericKnobDescription): ComponentResult;
  730.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  731.     INLINE $2F3C, $0018, $0201, $7000, $A82A;
  732.     {$ENDC}
  733. FUNCTION MusicDerivedSetPart(mc: MusicComponent; partNumber: LONGINT; VAR p: GCPart): ComponentResult;
  734.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  735.     INLINE $2F3C, $0008, $0202, $7000, $A82A;
  736.     {$ENDC}
  737. FUNCTION MusicDerivedSetInstrument(mc: MusicComponent; partNumber: LONGINT; VAR p: GCPart): ComponentResult;
  738.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  739.     INLINE $2F3C, $0008, $0203, $7000, $A82A;
  740.     {$ENDC}
  741. FUNCTION MusicDerivedSetPartInstrumentNumber(mc: MusicComponent; partNumber: LONGINT; VAR p: GCPart): ComponentResult;
  742.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  743.     INLINE $2F3C, $0008, $0204, $7000, $A82A;
  744.     {$ENDC}
  745. FUNCTION MusicDerivedSetMIDI(mc: MusicComponent; midiProc: MusicMIDISendProcPtr; refcon: LONGINT; midiChannel: LONGINT): ComponentResult;
  746.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  747.     INLINE $2F3C, $000C, $0205, $7000, $A82A;
  748.     {$ENDC}
  749. FUNCTION MusicDerivedStorePartInstrument(mc: MusicComponent; partNumber: LONGINT; VAR p: GCPart; instrumentNumber: LONGINT): ComponentResult;
  750.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  751.     INLINE $2F3C, $000C, $0206, $7000, $A82A;
  752.     {$ENDC}
  753.  
  754.  
  755.  
  756. {  Mask bit for returned value by InstrumentFind. }
  757.  
  758. CONST
  759.     kInstrumentExactMatch        = $00020000;
  760.     kInstrumentRecommendedSubstitute = $00010000;
  761.     kInstrumentQualityField        = $FF000000;
  762.     kInstrumentRoland8BitQuality = $05000000;
  763.  
  764.  
  765. TYPE
  766.     InstrumentAboutInfoHandle            = ^InstrumentAboutInfoPtr;
  767.     GMInstrumentInfoPtr = ^GMInstrumentInfo;
  768.     GMInstrumentInfo = RECORD
  769.         cmpInstID:                LONGINT;
  770.         gmInstNum:                LONGINT;
  771.         instMatch:                LONGINT;
  772.     END;
  773.  
  774.     GMInstrumentInfoHandle                = ^GMInstrumentInfoPtr;
  775.     nonGMInstrumentInfoRecordPtr = ^nonGMInstrumentInfoRecord;
  776.     nonGMInstrumentInfoRecord = RECORD
  777.         cmpInstID:                LONGINT;                                {  if 0, category name }
  778.         flags:                    LONGINT;                                {  match, show in picker }
  779.         toneNameIndex:            LONGINT;                                {  index in toneNames (1 based) }
  780.         itxtNameAtomID:            LONGINT;                                {  index in itxtNames (itxt/name by index) }
  781.     END;
  782.  
  783.     nonGMInstrumentInfoPtr = ^nonGMInstrumentInfo;
  784.     nonGMInstrumentInfo = RECORD
  785.         recordCount:            LONGINT;
  786.         toneNames:                Handle;                                    {  name from tone description }
  787.         itxtNames:                QTAtomContainer;                        {  itext/name atoms for instruments }
  788.         instInfo:                ARRAY [0..0] OF nonGMInstrumentInfoRecord;
  789.     END;
  790.  
  791.     nonGMInstrumentInfoHandle            = ^nonGMInstrumentInfoPtr;
  792.     InstCompInfoPtr = ^InstCompInfo;
  793.     InstCompInfo = RECORD
  794.         infoSize:                LONGINT;                                {  size of this record }
  795.         InstrumentLibraryName:    Str31;
  796.         InstrumentLibraryITxt:    QTAtomContainer;                        {  itext/name atoms for instruments }
  797.         GMinstrumentCount:        LONGINT;
  798.         GMinstrumentInfo:        GMInstrumentInfoHandle;
  799.         GMdrumCount:            LONGINT;
  800.         GMdrumInfo:                GMInstrumentInfoHandle;
  801.         nonGMinstrumentCount:    LONGINT;
  802.         nonGMinstrumentInfo:    nonGMInstrumentInfoHandle;
  803.     END;
  804.  
  805.     InstCompInfoHandle                    = ^InstCompInfoPtr;
  806. FUNCTION InstrumentGetInst(ci: ComponentInstance; instID: LONGINT; VAR atomicInst: AtomicInstrument; flags: LONGINT): ComponentResult;
  807.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  808.     INLINE $2F3C, $000C, $0001, $7000, $A82A;
  809.     {$ENDC}
  810. FUNCTION InstrumentGetInfo(ci: ComponentInstance; getInstrumentInfoFlags: LONGINT; VAR instInfo: InstCompInfoHandle): ComponentResult;
  811.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  812.     INLINE $2F3C, $0008, $0002, $7000, $A82A;
  813.     {$ENDC}
  814. FUNCTION InstrumentInitialize(ci: ComponentInstance; initFormat: LONGINT; initParams: UNIV Ptr): ComponentResult;
  815.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  816.     INLINE $2F3C, $0008, $0003, $7000, $A82A;
  817.     {$ENDC}
  818. FUNCTION InstrumentOpenComponentResFile(ci: ComponentInstance; VAR resFile: INTEGER): ComponentResult;
  819.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  820.     INLINE $2F3C, $0004, $0004, $7000, $A82A;
  821.     {$ENDC}
  822. FUNCTION InstrumentCloseComponentResFile(ci: ComponentInstance; resFile: INTEGER): ComponentResult;
  823.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  824.     INLINE $2F3C, $0002, $0005, $7000, $A82A;
  825.     {$ENDC}
  826. FUNCTION InstrumentGetComponentRefCon(ci: ComponentInstance; VAR refCon: UNIV Ptr): ComponentResult;
  827.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  828.     INLINE $2F3C, $0004, $0006, $7000, $A82A;
  829.     {$ENDC}
  830. FUNCTION InstrumentSetComponentRefCon(ci: ComponentInstance; refCon: UNIV Ptr): ComponentResult;
  831.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  832.     INLINE $2F3C, $0004, $0007, $7000, $A82A;
  833.     {$ENDC}
  834.  
  835.  
  836. {--------------------------
  837.     Types
  838. --------------------------}
  839.  
  840.  
  841. CONST
  842.     kSynthesizerConnectionMono    = 1;                            {  if set, and synth can be mono/poly, then the partCount channels from the system channel are hogged  }
  843.     kSynthesizerConnectionMMgr    = 2;                            {  this connection imported from the MIDI Mgr  }
  844.     kSynthesizerConnectionOMS    = 4;                            {  this connection imported from OMS  }
  845.     kSynthesizerConnectionQT    = 8;                            {  this connection is a QuickTime-only port  }
  846.     kSynthesizerConnectionFMS    = 16;                            {  this connection imported from FMS  }
  847.  
  848. { used for MIDI device only }
  849.  
  850. TYPE
  851.     SynthesizerConnectionsPtr = ^SynthesizerConnections;
  852.     SynthesizerConnections = RECORD
  853.         clientID:                OSType;
  854.         inputPortID:            OSType;                                    {  terminology death: this port is used to SEND to the midi synth  }
  855.         outputPortID:            OSType;                                    {  terminology death: this port receives from a keyboard or other control device  }
  856.         midiChannel:            LONGINT;                                {  The system channel; others are configurable (or the nubus slot number)  }
  857.         flags:                    LONGINT;
  858.         unique:                    LONGINT;                                {  unique id may be used instead of index, to getinfo and unregister calls  }
  859.         reserved1:                LONGINT;                                {  should be zero  }
  860.         reserved2:                LONGINT;                                {  should be zero  }
  861.     END;
  862.  
  863.     QTMIDIPortPtr = ^QTMIDIPort;
  864.     QTMIDIPort = RECORD
  865.         portConnections:        SynthesizerConnections;
  866.         portName:                Str63;
  867.     END;
  868.  
  869.  
  870. CONST
  871.     kNoteRequestNoGM            = 1;                            {  dont degrade to a GM synth  }
  872.     kNoteRequestNoSynthType        = 2;                            {  dont degrade to another synth of same type but different name  }
  873.     kNoteRequestSynthMustMatch    = 4;                            {  synthType must be a match, including kGMSynthComponentSubType  }
  874.  
  875.  
  876. TYPE
  877.     NoteAllocator                        = ComponentInstance;
  878.     NoteRequestInfoPtr = ^NoteRequestInfo;
  879.     NoteRequestInfo = RECORD
  880.         flags:                    SInt8;                                    {  1: dont accept GM match, 2: dont accept same-synth-type match  }
  881.         reserved:                SInt8;                                    {  must be zero  }
  882.         polyphony:                INTEGER;                                {  Maximum number of voices  }
  883.         typicalPolyphony:        Fixed;                                    {  Hint for level mixing  }
  884.     END;
  885.  
  886.     NoteRequestPtr = ^NoteRequest;
  887.     NoteRequest = RECORD
  888.         info:                    NoteRequestInfo;
  889.         tone:                    ToneDescription;
  890.     END;
  891.  
  892.     NoteChannel = ^LONGINT;
  893.  
  894.  
  895.  
  896. CONST
  897.     kPickDontMix                = 1;                            {  dont mix instruments with drum sounds  }
  898.     kPickSameSynth                = 2;                            {  only allow the same device that went in, to come out  }
  899.     kPickUserInsts                = 4;                            {  show user insts in addition to ROM voices  }
  900.     kPickEditAllowEdit            = 8;                            {  lets user switch over to edit mode  }
  901.     kPickEditAllowPick            = 16;                            {  lets the user switch over to pick mode  }
  902.     kPickEditSynthGlobal        = 32;                            {  edit the global knobs of the synth  }
  903.     kPickEditControllers        = 64;                            {  edit the controllers of the notechannel  }
  904.  
  905.  
  906.     kNoteAllocatorComponentType    = 'nota';
  907.  
  908.  
  909. {--------------------------------
  910.     Note Allocator Prototypes
  911. --------------------------------}
  912. FUNCTION NARegisterMusicDevice(ci: NoteAllocator; synthType: OSType; VAR name: Str31; VAR connections: SynthesizerConnections): ComponentResult;
  913.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  914.     INLINE $2F3C, $000C, $0000, $7000, $A82A;
  915.     {$ENDC}
  916. FUNCTION NAUnregisterMusicDevice(ci: NoteAllocator; index: LONGINT): ComponentResult;
  917.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  918.     INLINE $2F3C, $0004, $0001, $7000, $A82A;
  919.     {$ENDC}
  920. FUNCTION NAGetRegisteredMusicDevice(ci: NoteAllocator; index: LONGINT; VAR synthType: OSType; VAR name: Str31; VAR connections: SynthesizerConnections; VAR mc: MusicComponent): ComponentResult;
  921.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  922.     INLINE $2F3C, $0014, $0002, $7000, $A82A;
  923.     {$ENDC}
  924. FUNCTION NASaveMusicConfiguration(ci: NoteAllocator): ComponentResult;
  925.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  926.     INLINE $2F3C, $0000, $0003, $7000, $A82A;
  927.     {$ENDC}
  928. FUNCTION NANewNoteChannel(ci: NoteAllocator; VAR noteRequest: NoteRequest; VAR outChannel: NoteChannel): ComponentResult;
  929.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  930.     INLINE $2F3C, $0008, $0004, $7000, $A82A;
  931.     {$ENDC}
  932. FUNCTION NADisposeNoteChannel(ci: NoteAllocator; noteChannel: NoteChannel): ComponentResult;
  933.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  934.     INLINE $2F3C, $0004, $0005, $7000, $A82A;
  935.     {$ENDC}
  936. FUNCTION NAGetNoteChannelInfo(ci: NoteAllocator; noteChannel: NoteChannel; VAR index: LONGINT; VAR part: LONGINT): ComponentResult;
  937.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  938.     INLINE $2F3C, $000C, $0006, $7000, $A82A;
  939.     {$ENDC}
  940. FUNCTION NAPrerollNoteChannel(ci: NoteAllocator; noteChannel: NoteChannel): ComponentResult;
  941.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  942.     INLINE $2F3C, $0004, $0007, $7000, $A82A;
  943.     {$ENDC}
  944. FUNCTION NAUnrollNoteChannel(ci: NoteAllocator; noteChannel: NoteChannel): ComponentResult;
  945.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  946.     INLINE $2F3C, $0004, $0008, $7000, $A82A;
  947.     {$ENDC}
  948.  
  949. FUNCTION NASetNoteChannelVolume(ci: NoteAllocator; noteChannel: NoteChannel; volume: Fixed): ComponentResult;
  950.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  951.     INLINE $2F3C, $0008, $000B, $7000, $A82A;
  952.     {$ENDC}
  953. FUNCTION NAResetNoteChannel(ci: NoteAllocator; noteChannel: NoteChannel): ComponentResult;
  954.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  955.     INLINE $2F3C, $0004, $000C, $7000, $A82A;
  956.     {$ENDC}
  957. FUNCTION NAPlayNote(ci: NoteAllocator; noteChannel: NoteChannel; pitch: LONGINT; velocity: LONGINT): ComponentResult;
  958.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  959.     INLINE $2F3C, $000C, $000D, $7000, $A82A;
  960.     {$ENDC}
  961. FUNCTION NASetController(ci: NoteAllocator; noteChannel: NoteChannel; controllerNumber: LONGINT; controllerValue: LONGINT): ComponentResult;
  962.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  963.     INLINE $2F3C, $000C, $000E, $7000, $A82A;
  964.     {$ENDC}
  965. FUNCTION NASetKnob(ci: NoteAllocator; noteChannel: NoteChannel; knobNumber: LONGINT; knobValue: LONGINT): ComponentResult;
  966.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  967.     INLINE $2F3C, $000C, $000F, $7000, $A82A;
  968.     {$ENDC}
  969. FUNCTION NAFindNoteChannelTone(ci: NoteAllocator; noteChannel: NoteChannel; VAR td: ToneDescription; VAR instrumentNumber: LONGINT): ComponentResult;
  970.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  971.     INLINE $2F3C, $000C, $0010, $7000, $A82A;
  972.     {$ENDC}
  973. FUNCTION NASetInstrumentNumber(ci: NoteAllocator; noteChannel: NoteChannel; instrumentNumber: LONGINT): ComponentResult;
  974.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  975.     INLINE $2F3C, $0008, $0011, $7000, $A82A;
  976.     {$ENDC}
  977.  
  978.  
  979. FUNCTION NAPickInstrument(ci: NoteAllocator; filterProc: ModalFilterUPP; prompt: StringPtr; VAR sd: ToneDescription; flags: LONGINT; refCon: LONGINT; reserved1: LONGINT; reserved2: LONGINT): ComponentResult;
  980.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  981.     INLINE $2F3C, $001C, $0012, $7000, $A82A;
  982.     {$ENDC}
  983. FUNCTION NAPickArrangement(ci: NoteAllocator; filterProc: ModalFilterUPP; prompt: StringPtr; zero1: LONGINT; zero2: LONGINT; t: Track; songName: StringPtr): ComponentResult;
  984.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  985.     INLINE $2F3C, $0018, $0013, $7000, $A82A;
  986.     {$ENDC}
  987.  
  988. FUNCTION NASetDefaultMIDIInput(ci: NoteAllocator; VAR sc: SynthesizerConnections): ComponentResult;
  989.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  990.     INLINE $2F3C, $0004, $0015, $7000, $A82A;
  991.     {$ENDC}
  992. FUNCTION NAGetDefaultMIDIInput(ci: NoteAllocator; VAR sc: SynthesizerConnections): ComponentResult;
  993.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  994.     INLINE $2F3C, $0004, $0016, $7000, $A82A;
  995.     {$ENDC}
  996.  
  997. FUNCTION NAUseDefaultMIDIInput(ci: NoteAllocator; readHook: MusicMIDIReadHookUPP; refCon: LONGINT; flags: LONGINT): ComponentResult;
  998.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  999.     INLINE $2F3C, $000C, $0019, $7000, $A82A;
  1000.     {$ENDC}
  1001. FUNCTION NALoseDefaultMIDIInput(ci: NoteAllocator): ComponentResult;
  1002.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1003.     INLINE $2F3C, $0000, $001A, $7000, $A82A;
  1004.     {$ENDC}
  1005. FUNCTION NAStuffToneDescription(ci: NoteAllocator; gmNumber: LONGINT; VAR td: ToneDescription): ComponentResult;
  1006.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1007.     INLINE $2F3C, $0008, $001B, $7000, $A82A;
  1008.     {$ENDC}
  1009. FUNCTION NACopyrightDialog(ci: NoteAllocator; p: PicHandle; author: StringPtr; copyright: StringPtr; other: StringPtr; title: StringPtr; filterProc: ModalFilterUPP; refCon: LONGINT): ComponentResult;
  1010.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1011.     INLINE $2F3C, $001C, $001C, $7000, $A82A;
  1012.     {$ENDC}
  1013.  
  1014. {
  1015.       kNADummyOneSelect = 29
  1016.       kNADummyTwoSelect = 30
  1017. }
  1018.  
  1019. FUNCTION NAGetIndNoteChannel(ci: NoteAllocator; index: LONGINT; VAR nc: NoteChannel; VAR seed: LONGINT): ComponentResult;
  1020.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1021.     INLINE $2F3C, $000C, $001F, $7000, $A82A;
  1022.     {$ENDC}
  1023.  
  1024. FUNCTION NAGetMIDIPorts(ci: NoteAllocator; VAR inputPorts: Handle; VAR outputPorts: Handle): ComponentResult;
  1025.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1026.     INLINE $2F3C, $0008, $0021, $7000, $A82A;
  1027.     {$ENDC}
  1028. FUNCTION NAGetNoteRequest(ci: NoteAllocator; noteChannel: NoteChannel; VAR nrOut: NoteRequest): ComponentResult;
  1029.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1030.     INLINE $2F3C, $0008, $0022, $7000, $A82A;
  1031.     {$ENDC}
  1032. FUNCTION NASendMIDI(ci: NoteAllocator; noteChannel: NoteChannel; VAR mp: MusicMIDIPacket): ComponentResult;
  1033.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1034.     INLINE $2F3C, $0008, $0023, $7000, $A82A;
  1035.     {$ENDC}
  1036. FUNCTION NAPickEditInstrument(ci: NoteAllocator; filterProc: ModalFilterUPP; prompt: StringPtr; refCon: LONGINT; nc: NoteChannel; ai: AtomicInstrument; flags: LONGINT): ComponentResult;
  1037.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1038.     INLINE $2F3C, $0018, $0024, $7000, $A82A;
  1039.     {$ENDC}
  1040. FUNCTION NANewNoteChannelFromAtomicInstrument(ci: NoteAllocator; instrument: AtomicInstrumentPtr; flags: LONGINT; VAR outChannel: NoteChannel): ComponentResult;
  1041.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1042.     INLINE $2F3C, $000C, $0025, $7000, $A82A;
  1043.     {$ENDC}
  1044. FUNCTION NASetAtomicInstrument(ci: NoteAllocator; noteChannel: NoteChannel; instrument: AtomicInstrumentPtr; flags: LONGINT): ComponentResult;
  1045.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1046.     INLINE $2F3C, $000C, $0026, $7000, $A82A;
  1047.     {$ENDC}
  1048.  
  1049.  
  1050. FUNCTION NAGetKnob(ci: NoteAllocator; noteChannel: NoteChannel; knobNumber: LONGINT; VAR knobValue: LONGINT): ComponentResult;
  1051.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1052.     INLINE $2F3C, $000C, $0028, $7000, $A82A;
  1053.     {$ENDC}
  1054. FUNCTION NATask(ci: NoteAllocator): ComponentResult;
  1055.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1056.     INLINE $2F3C, $0000, $0029, $7000, $A82A;
  1057.     {$ENDC}
  1058. FUNCTION NASetNoteChannelBalance(ci: NoteAllocator; noteChannel: NoteChannel; balance: LONGINT): ComponentResult;
  1059.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1060.     INLINE $2F3C, $0008, $002A, $7000, $A82A;
  1061.     {$ENDC}
  1062. FUNCTION NASetInstrumentNumberInterruptSafe(ci: NoteAllocator; noteChannel: NoteChannel; instrumentNumber: LONGINT): ComponentResult;
  1063.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1064.     INLINE $2F3C, $0008, $002B, $7000, $A82A;
  1065.     {$ENDC}
  1066. FUNCTION NASetNoteChannelSoundLocalization(ci: NoteAllocator; noteChannel: NoteChannel; data: Handle): ComponentResult;
  1067.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1068.     INLINE $2F3C, $0008, $002C, $7000, $A82A;
  1069.     {$ENDC}
  1070.  
  1071.  
  1072.  
  1073.  
  1074. CONST
  1075.     kTuneQueueDepth                = 8;                            {  Deepest you can queue tune segments  }
  1076.  
  1077.  
  1078.  
  1079. TYPE
  1080.     TuneStatusPtr = ^TuneStatus;
  1081.     TuneStatus = RECORD
  1082.         tune:                    LongintPtr;                                {  currently playing tune  }
  1083.         tunePtr:                LongintPtr;                                {  position within currently playing piece  }
  1084.         time:                    TimeValue;                                {  current tune time  }
  1085.         queueCount:                INTEGER;                                {  how many pieces queued up?  }
  1086.         queueSpots:                INTEGER;                                {  How many more tunepieces can be queued  }
  1087.         queueTime:                TimeValue;                                {  How much time is queued up? (can be very inaccurate)  }
  1088.         reserved:                ARRAY [0..2] OF LONGINT;
  1089.     END;
  1090.  
  1091.     TuneCallBackProcPtr = ProcPtr;  { PROCEDURE TuneCallBack((CONST)VAR status: TuneStatus; refCon: LONGINT); }
  1092.  
  1093.     TunePlayCallBackProcPtr = ProcPtr;  { PROCEDURE TunePlayCallBack(VAR event: LONGINT; seed: LONGINT; refCon: LONGINT); }
  1094.  
  1095.     TuneCallBackUPP = UniversalProcPtr;
  1096.     TunePlayCallBackUPP = UniversalProcPtr;
  1097.     TunePlayer                            = ComponentInstance;
  1098.  
  1099. CONST
  1100.     kTunePlayerType                = 'tune';
  1101.  
  1102.  
  1103. FUNCTION TuneSetHeader(tp: TunePlayer; VAR header: LONGINT): ComponentResult;
  1104.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1105.     INLINE $2F3C, $0004, $0004, $7000, $A82A;
  1106.     {$ENDC}
  1107. FUNCTION TuneGetTimeBase(tp: TunePlayer; VAR tb: TimeBase): ComponentResult;
  1108.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1109.     INLINE $2F3C, $0004, $0005, $7000, $A82A;
  1110.     {$ENDC}
  1111. FUNCTION TuneSetTimeScale(tp: TunePlayer; scale: TimeScale): ComponentResult;
  1112.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1113.     INLINE $2F3C, $0004, $0006, $7000, $A82A;
  1114.     {$ENDC}
  1115. FUNCTION TuneGetTimeScale(tp: TunePlayer; VAR scale: TimeScale): ComponentResult;
  1116.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1117.     INLINE $2F3C, $0004, $0007, $7000, $A82A;
  1118.     {$ENDC}
  1119. FUNCTION TuneGetIndexedNoteChannel(tp: TunePlayer; i: LONGINT; VAR nc: NoteChannel): ComponentResult;
  1120.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1121.     INLINE $2F3C, $0008, $0008, $7000, $A82A;
  1122.     {$ENDC}
  1123.  
  1124. { Values for when to start. }
  1125.  
  1126. CONST
  1127.     kTuneStartNow                = 1;                            {  start after buffer is implied  }
  1128.     kTuneDontClipNotes            = 2;                            {  allow notes to finish their durations outside sample  }
  1129.     kTuneExcludeEdgeNotes        = 4;                            {  dont play notes that start at end of tune  }
  1130.     kTuneQuickStart                = 8;                            {  Leave all the controllers where they are, ignore start time  }
  1131.     kTuneLoopUntil                = 16;                            {  loop a queued tune if there's nothing else in the queue  }
  1132.     kTuneStartNewMaster            = 16384;
  1133.  
  1134. FUNCTION TuneQueue(tp: TunePlayer; VAR tune: LONGINT; tuneRate: Fixed; tuneStartPosition: LONGINT; tuneStopPosition: LONGINT; queueFlags: LONGINT; callBackProc: TuneCallBackUPP; refCon: LONGINT): ComponentResult;
  1135.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1136.     INLINE $2F3C, $001C, $000A, $7000, $A82A;
  1137.     {$ENDC}
  1138. FUNCTION TuneInstant(tp: TunePlayer; tune: UNIV Ptr; tunePosition: LONGINT): ComponentResult;
  1139.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1140.     INLINE $2F3C, $0008, $000B, $7000, $A82A;
  1141.     {$ENDC}
  1142. FUNCTION TuneGetStatus(tp: TunePlayer; VAR status: TuneStatus): ComponentResult;
  1143.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1144.     INLINE $2F3C, $0004, $000C, $7000, $A82A;
  1145.     {$ENDC}
  1146. { Values for stopping. }
  1147.  
  1148. CONST
  1149.     kTuneStopFade                = 1;                            {  do a quick, synchronous fadeout  }
  1150.     kTuneStopSustain            = 2;                            {  don't silece notes  }
  1151.     kTuneStopInstant            = 4;                            {  silence notes fast (else, decay them)  }
  1152.     kTuneStopReleaseChannels    = 8;                            {  afterwards, let the channels go  }
  1153.  
  1154. FUNCTION TuneStop(tp: TunePlayer; stopFlags: LONGINT): ComponentResult;
  1155.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1156.     INLINE $2F3C, $0004, $000D, $7000, $A82A;
  1157.     {$ENDC}
  1158.  
  1159. FUNCTION TuneSetVolume(tp: TunePlayer; volume: Fixed): ComponentResult;
  1160.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1161.     INLINE $2F3C, $0004, $0010, $7000, $A82A;
  1162.     {$ENDC}
  1163. FUNCTION TuneGetVolume(tp: TunePlayer): ComponentResult;
  1164.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1165.     INLINE $2F3C, $0000, $0011, $7000, $A82A;
  1166.     {$ENDC}
  1167. FUNCTION TunePreroll(tp: TunePlayer): ComponentResult;
  1168.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1169.     INLINE $2F3C, $0000, $0012, $7000, $A82A;
  1170.     {$ENDC}
  1171. FUNCTION TuneUnroll(tp: TunePlayer): ComponentResult;
  1172.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1173.     INLINE $2F3C, $0000, $0013, $7000, $A82A;
  1174.     {$ENDC}
  1175. FUNCTION TuneSetNoteChannels(tp: TunePlayer; count: LONGINT; VAR noteChannelList: NoteChannel; playCallBackProc: TunePlayCallBackUPP; refCon: LONGINT): ComponentResult;
  1176.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1177.     INLINE $2F3C, $0010, $0014, $7000, $A82A;
  1178.     {$ENDC}
  1179. FUNCTION TuneSetPartTranspose(tp: TunePlayer; part: LONGINT; transpose: LONGINT; velocityShift: LONGINT): ComponentResult;
  1180.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1181.     INLINE $2F3C, $000C, $0015, $7000, $A82A;
  1182.     {$ENDC}
  1183.  
  1184. FUNCTION TuneGetNoteAllocator(tp: TunePlayer): NoteAllocator;
  1185.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1186.     INLINE $2F3C, $0000, $0017, $7000, $A82A;
  1187.     {$ENDC}
  1188. FUNCTION TuneSetSofter(tp: TunePlayer; softer: LONGINT): ComponentResult;
  1189.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1190.     INLINE $2F3C, $0004, $0018, $7000, $A82A;
  1191.     {$ENDC}
  1192. FUNCTION TuneTask(tp: TunePlayer): ComponentResult;
  1193.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1194.     INLINE $2F3C, $0000, $0019, $7000, $A82A;
  1195.     {$ENDC}
  1196. FUNCTION TuneSetBalance(tp: TunePlayer; balance: LONGINT): ComponentResult;
  1197.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1198.     INLINE $2F3C, $0004, $001A, $7000, $A82A;
  1199.     {$ENDC}
  1200. FUNCTION TuneSetSoundLocalization(tp: TunePlayer; data: Handle): ComponentResult;
  1201.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1202.     INLINE $2F3C, $0004, $001B, $7000, $A82A;
  1203.     {$ENDC}
  1204. FUNCTION TuneSetHeaderWithSize(tp: TunePlayer; VAR header: LONGINT; size: LONGINT): ComponentResult;
  1205.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1206.     INLINE $2F3C, $0008, $001C, $7000, $A82A;
  1207.     {$ENDC}
  1208.  
  1209.  
  1210. TYPE
  1211.     MusicOpWord                            = LONGINT;
  1212.     MusicOpWordPtr                        = ^LONGINT;
  1213. {     QuickTime Music Track Event Formats:
  1214.  
  1215.     At this time, QuickTime music tracks support 5 different event types -- REST events,
  1216.     short NOTE events, short CONTROL events, short GENERAL events, Long NOTE events, 
  1217.     long CONTROL events, and variable GENERAL events.
  1218.  
  1219.         • REST Event (4 bytes/event):
  1220.     
  1221.             (0 0 0) (5-bit UNUSED) (24-bit Rest Duration)
  1222.         
  1223.         • Short NOTE Events (4 bytes/event):
  1224.     
  1225.             (0 0 1) (5-bit Part) (6-bit Pitch) (7-bit Volume) (11-bit Duration)
  1226.         
  1227.             where:    Pitch is offset by 32 (Actual pitch = pitch field + 32)
  1228.  
  1229.         • Short CONTROL Events (4 bytes/event):
  1230.     
  1231.             (0 1 0) (5-bit Part) (8-bit Controller) (1-bit UNUSED) (1-bit Sign) (7-bit MSB) (7-bit LSB)
  1232.                                                                          ( or 15-bit Signed Value)
  1233.         • Short GENERAL Event (4 bytes/event):
  1234.     
  1235.             (0 1 1) (1-bit UNUSED) (12-bit Sub-Type) (16-bit Value)
  1236.     
  1237.         • Long NOTE Events (8 bytes/event):
  1238.     
  1239.             (1 0 0 1) (12-bit Part) (1-bit UNUSED) (7-bit Pitch) (1-bit UNUSED) (7-bit Volume)
  1240.             (1 0) (8-bit UNUSED) (22-bit Duration)
  1241.         
  1242.         • Long CONTROL Event (8 bytes/event):
  1243.         
  1244.             (1 0 1 0) (12-bit Part) (16-bit Value MSB) 
  1245.             (1 0) (14-bit Controller) (16-bit Value LSB)
  1246.     
  1247.         • Long KNOB Event (8 bytes/event):
  1248.     
  1249.             (1 0 1 1) (12-bit Sub-Type) (16-bit Value MSB)
  1250.             (1 0) (14-bit KNOB) (16-bit Value LSB)
  1251.     
  1252.         • Variable GENERAL Length Events (N bytes/event):
  1253.     
  1254.             (1 1 1 1) (12-bit Sub-Type) (16-bit Length)
  1255.                 :
  1256.             (32-bit Data values)
  1257.                 :
  1258.             (1 1) (14-bit UNUSED) (16-bit Length)
  1259.     
  1260.             where:    Length field is the number of LONG words in the record.
  1261.                     Lengths include the first and last long words (Minimum length = 2)
  1262.                 
  1263.     The following event type values have not been used yet and are reserved for 
  1264.     future expansion:
  1265.         
  1266.         • (1 0 0 0)        (8 bytes/event)
  1267.         • (1 1 0 0)        (N bytes/event)
  1268.         • (1 1 0 1)        (N bytes/event)
  1269.         • (1 1 1 0)        (N bytes/event)
  1270.         
  1271.     For all events, the following generalizations apply:
  1272.     
  1273.         -    All duration values are specified in Millisecond units.
  1274.         -     Pitch values are intended to map directly to the MIDI key numbers.
  1275.         -    Controllers from 0 to 127 correspond to the standard MIDI controllers.
  1276.             Controllers greater than 127 correspond to other controls (i.e., Pitch Bend, 
  1277.             Key Pressure, and Channel Pressure).    
  1278. }
  1279.  
  1280. {  Defines for the implemented music event data fields }
  1281.  
  1282. CONST
  1283.     kRestEventType                = $00000000;                    {  lower 3-bits  }
  1284.     kNoteEventType                = $00000001;                    {  lower 3-bits  }
  1285.     kControlEventType            = $00000002;                    {  lower 3-bits  }
  1286.     kMarkerEventType            = $00000003;                    {  lower 3-bits  }
  1287.     kUndefined1EventType        = $00000008;                    {  4-bits  }
  1288.     kXNoteEventType                = $00000009;                    {  4-bits  }
  1289.     kXControlEventType            = $0000000A;                    {  4-bits  }
  1290.     kKnobEventType                = $0000000B;                    {  4-bits  }
  1291.     kUndefined2EventType        = $0000000C;                    {  4-bits  }
  1292.     kUndefined3EventType        = $0000000D;                    {  4-bits  }
  1293.     kUndefined4EventType        = $0000000E;                    {  4-bits  }
  1294.     kGeneralEventType            = $0000000F;                    {  4-bits  }
  1295.     kXEventLengthBits            = $00000002;                    {  2 bits: indicates 8-byte event record  }
  1296.     kGeneralEventLengthBits        = $00000003;                    {  2 bits: indicates variable length event record  }
  1297.     kEventLen                    = 1;                            {  length of events in long words  }
  1298.     kXEventLen                    = 2;
  1299.     kRestEventLen                = 1;                            {  length of events in long words  }
  1300.     kNoteEventLen                = 1;
  1301.     kControlEventLen            = 1;
  1302.     kMarkerEventLen                = 1;
  1303.     kXNoteEventLen                = 2;
  1304.     kXControlEventLen            = 2;
  1305.     kGeneralEventLen            = 2;                            {  2 or more, however  }
  1306.                                                                 {  Universal Event Defines }
  1307.     kEventLengthFieldPos        = 30;                            {  by looking at these two bits of the 1st or last word               }
  1308.     kEventLengthFieldWidth        = 2;                            {  of an event you can determine the event length                       }
  1309.                                                                 {  length field: 0 & 1 => 1 long; 2 => 2 longs; 3 => variable length  }
  1310.     kEventTypeFieldPos            = 29;                            {  event type field for short events  }
  1311.     kEventTypeFieldWidth        = 3;                            {  short type is 3 bits  }
  1312.     kXEventTypeFieldPos            = 28;                            {  event type field for extended events  }
  1313.     kXEventTypeFieldWidth        = 4;                            {  extended type is 4 bits  }
  1314.     kEventPartFieldPos            = 24;
  1315.     kEventPartFieldWidth        = 5;
  1316.     kXEventPartFieldPos            = 16;                            {  in the 1st long word  }
  1317.     kXEventPartFieldWidth        = 12;                            {  Rest Events }
  1318.     kRestEventDurationFieldPos    = 0;
  1319.     kRestEventDurationFieldWidth = 24;
  1320.     kRestEventDurationMax        = $00FFFFFF;                    {  Note Events }
  1321.     kNoteEventPitchFieldPos        = 18;
  1322.     kNoteEventPitchFieldWidth    = 6;
  1323.     kNoteEventPitchOffset        = 32;                            {  add to value in pitch field to get actual pitch  }
  1324.     kNoteEventVolumeFieldPos    = 11;
  1325.     kNoteEventVolumeFieldWidth    = 7;
  1326.     kNoteEventVolumeOffset        = 0;                            {  add to value in volume field to get actual volume  }
  1327.     kNoteEventDurationFieldPos    = 0;
  1328.     kNoteEventDurationFieldWidth = 11;
  1329.     kNoteEventDurationMax        = $000007FF;
  1330.     kXNoteEventPitchFieldPos    = 0;                            {  in the 1st long word  }
  1331.     kXNoteEventPitchFieldWidth    = 16;
  1332.     kXNoteEventDurationFieldPos    = 0;                            {  in the 2nd long word  }
  1333.     kXNoteEventDurationFieldWidth = 22;
  1334.     kXNoteEventDurationMax        = $003FFFFF;
  1335.     kXNoteEventVolumeFieldPos    = 22;                            {  in the 2nd long word  }
  1336.     kXNoteEventVolumeFieldWidth    = 7;                            {  Control Events }
  1337.     kControlEventControllerFieldPos = 16;
  1338.     kControlEventControllerFieldWidth = 8;
  1339.     kControlEventValueFieldPos    = 0;
  1340.     kControlEventValueFieldWidth = 16;
  1341.     kXControlEventControllerFieldPos = 0;                        {  in the 2nd long word  }
  1342.     kXControlEventControllerFieldWidth = 16;
  1343.     kXControlEventValueFieldPos    = 0;                            {  in the 1st long word  }
  1344.     kXControlEventValueFieldWidth = 16;                            {  Knob Events }
  1345.     kKnobEventValueHighFieldPos    = 0;                            {  1st long word  }
  1346.     kKnobEventValueHighFieldWidth = 16;
  1347.     kKnobEventKnobFieldPos        = 16;                            {  2nd long word  }
  1348.     kKnobEventKnobFieldWidth    = 14;
  1349.     kKnobEventValueLowFieldPos    = 0;                            {  2nd long word  }
  1350.     kKnobEventValueLowFieldWidth = 16;                            {  Marker Events }
  1351.     kMarkerEventSubtypeFieldPos    = 16;
  1352.     kMarkerEventSubtypeFieldWidth = 8;
  1353.     kMarkerEventValueFieldPos    = 0;
  1354.     kMarkerEventValueFieldWidth    = 16;                            {  General Events }
  1355.     kGeneralEventSubtypeFieldPos = 16;                            {  in the last long word  }
  1356.     kGeneralEventSubtypeFieldWidth = 14;
  1357.     kGeneralEventLengthFieldPos    = 0;                            {  in the 1st & last long words  }
  1358.     kGeneralEventLengthFieldWidth = 16;
  1359.  
  1360.  
  1361.  
  1362. {  General Event Defined Types }
  1363.     kGeneralEventNoteRequest    = 1;                            {  Encapsulates NoteRequest data structure  }
  1364.     kGeneralEventPartKey        = 4;
  1365.     kGeneralEventTuneDifference    = 5;                            {  Contains a standard sequence, with end marker, for the tune difference of a sequence piece (halts QuickTime 2.0 Music)  }
  1366.     kGeneralEventAtomicInstrument = 6;                            {  Encapsulates AtomicInstrument record  }
  1367.     kGeneralEventKnob            = 7;                            {  knobID/knobValue pairs; smallest event is 4 longs  }
  1368.     kGeneralEventMIDIChannel    = 8;                            {  used in tune header, one longword identifies the midi channel it originally came from  }
  1369.     kGeneralEventPartChange        = 9;                            {  used in tune sequence, one longword identifies the tune part which can now take over this part's note channel (similar to program change) (halts QuickTime 2.0 Music) }
  1370.     kGeneralEventNoOp            = 10;                            {  guaranteed to do nothing and be ignored. (halts QuickTime 2.0 Music)  }
  1371.     kGeneralEventUsedNotes        = 11;                            {  four longwords specifying which midi notes are actually used, 0..127 msb to lsb  }
  1372.  
  1373. {  Marker Event Defined Types        // marker is 60 ee vv vv in hex, where e = event type, and v = value }
  1374.     kMarkerEventEnd                = 0;                            {  marker type 0 means: value 0 - stop, value != 0 - ignore }
  1375.     kMarkerEventBeat            = 1;                            {  value 0 = single beat; anything else is 65536ths-of-a-beat (quarter note) }
  1376.     kMarkerEventTempo            = 2;                            {  value same as beat marker, but indicates that a tempo event should be computed (based on where the next beat or tempo marker is) and emitted upon export }
  1377.  
  1378.  
  1379.  
  1380. { UPP call backs }
  1381.     uppMusicMIDISendProcInfo = $00000FF0;
  1382.     uppMusicMIDIReadHookProcInfo = $000003F0;
  1383.     uppMusicOfflineDataProcInfo = $00000FF0;
  1384.     uppTuneCallBackProcInfo = $000003C0;
  1385.     uppTunePlayCallBackProcInfo = $00000FC0;
  1386.  
  1387. FUNCTION NewMusicMIDISendProc(userRoutine: MusicMIDISendProcPtr): MusicMIDISendUPP;
  1388.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1389.     INLINE $2E9F;
  1390.     {$ENDC}
  1391.  
  1392. FUNCTION NewMusicMIDIReadHookProc(userRoutine: MusicMIDIReadHookProcPtr): MusicMIDIReadHookUPP;
  1393.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1394.     INLINE $2E9F;
  1395.     {$ENDC}
  1396.  
  1397. FUNCTION NewMusicOfflineDataProc(userRoutine: MusicOfflineDataProcPtr): MusicOfflineDataUPP;
  1398.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1399.     INLINE $2E9F;
  1400.     {$ENDC}
  1401.  
  1402. FUNCTION NewTuneCallBackProc(userRoutine: TuneCallBackProcPtr): TuneCallBackUPP;
  1403.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1404.     INLINE $2E9F;
  1405.     {$ENDC}
  1406.  
  1407. FUNCTION NewTunePlayCallBackProc(userRoutine: TunePlayCallBackProcPtr): TunePlayCallBackUPP;
  1408.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1409.     INLINE $2E9F;
  1410.     {$ENDC}
  1411.  
  1412. FUNCTION CallMusicMIDISendProc(self: MusicComponent; refCon: LONGINT; VAR mmp: MusicMIDIPacket; userRoutine: MusicMIDISendUPP): ComponentResult;
  1413.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1414.     INLINE $205F, $4E90;
  1415.     {$ENDC}
  1416.  
  1417. FUNCTION CallMusicMIDIReadHookProc(VAR mp: MusicMIDIPacket; myRefCon: LONGINT; userRoutine: MusicMIDIReadHookUPP): ComponentResult;
  1418.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1419.     INLINE $205F, $4E90;
  1420.     {$ENDC}
  1421.  
  1422. FUNCTION CallMusicOfflineDataProc(SoundData: Ptr; numBytes: LONGINT; myRefCon: LONGINT; userRoutine: MusicOfflineDataUPP): ComponentResult;
  1423.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1424.     INLINE $205F, $4E90;
  1425.     {$ENDC}
  1426.  
  1427. PROCEDURE CallTuneCallBackProc({CONST}VAR status: TuneStatus; refCon: LONGINT; userRoutine: TuneCallBackUPP);
  1428.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1429.     INLINE $205F, $4E90;
  1430.     {$ENDC}
  1431.  
  1432. PROCEDURE CallTunePlayCallBackProc(VAR event: LONGINT; seed: LONGINT; refCon: LONGINT; userRoutine: TunePlayCallBackUPP);
  1433.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1434.     INLINE $205F, $4E90;
  1435.     {$ENDC}
  1436.  
  1437.  
  1438. {$ALIGN RESET}
  1439. {$POP}
  1440.  
  1441. {$SETC UsingIncludes := QuickTimeMusicIncludes}
  1442.  
  1443. {$ENDC} {__QUICKTIMEMUSIC__}
  1444.  
  1445. {$IFC NOT UsingIncludes}
  1446.  END.
  1447. {$ENDC}
  1448.